home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------*/
- /* */
- /* STDCAT V4.3 */
- /* by */
- /* Bob Silliker */
- /* */
- /* July 16, 1989 */
- /* */
- /*------------------------------------------------------------------*/
-
-
- Introduction
- ------------
-
- STDCAT is a simple disk catalog program. The name was derived
- from 520ST (ST) and Disk CATalog (DCAT). It will work on
- either mono or color systems (Med Rez color).
-
- This is the last version of STDCAT (provided there aren't any
- major bugs.) that will work with the existing catalog file format.
- The next major release of STDCAT (V5.0) will be out sometime in
- the fall of 1989.
-
-
- Version 4.3 has the following improvments over 4.2
- - I have extended the printer time out from about 6 seconds to
- about 18 seconds. Some sloooow printers were timing out when
- they shouldn't.
-
- Version 4.2 has the following improvments over 4.0
- - The program forces the .CAT extension for all catalog file
- names. When saving a catalog the catalog file name will have
- the extension replaced with .CAT.
-
- - The volume name underscore 2-3-4 bomb problem is fixed. This
- was caused by a GEM bug (tedinfo and valid string "nnnnnnnnnnn").
- However, the new allow string allows '?' and '*' to be entered
- in the volume name dialog. So the program detects the '?' and
- '*' and replaces them with '_'.
-
- - The program would ask you if the catalog disk was in drive A
- when saving even when the catalog save file is on another disk.
- This only occured when the A was the default drive. It no
- longer does this.
-
- - The catalog stats dialog now contains the catalog file
- modification date.
-
- - The program will take one command line argument that is either
- the catalog directory or the catalog file to open.
-
- - The menu entry 'Comment' is now 'Dcomment' and is still the
- Disk comment (like Fcomment is File/Folder comment).
-
- - The menu entry 'Display Comments' is now 'Display Fcomments'.
-
- - The menu entry 'Print Comments' is now 'Print Fcomments'.
-
- - If extra volume labels are found they are deleted when the
- volume label is changed.
-
- - There is a new menu option that allows reading catalogs onto
- the end of the a catalog already loaded into memory.
-
- - I have provided the source code for a program that shows how
- to read the catalog information from the catalog file. This
- is for people who want to write their own printing programs.
-
- Version 4.0 has at least the following features over 3.0
-
- - the bug that caused the 16 folder limit on a disk has been
- been corrected and is 16 folder levels.
-
- - there is a environment variable 'STDCAT' for the default path
- to the catalog file.
-
- - a new menu option that allows deletion of a disk. This
- causes the disks (after the disk deleted) to be renumbered.
-
- - each folder/file can have a 33 character comment string.
-
- - minor fix that allows the use of lowercase letters when
- entering the volume name (the volume name is converted to
- uppercase when the user exists the volume dialog).
-
- - there is a new print option to include the file comment
- in the printout.
-
- - find has been expanded to include comment and volume fields.
-
- - find has much better pattern matching capabilities.
-
- - when adding or updating a disk the disk serial number is
- read in and stored.
-
- The program has two windows. One window is used to contain
- a list of the disk volumes in the catalog. The other window
- lists the contents of the current disk. The user is allowed
- to browse through either window using either the slider bars
- or arrows.
-
- There are menu options to sort the disk content window by
- name, date, size or type and options to find files using wild
- cards, add/update/delete disks, add a comment to a disk/folder/
- file, and finally change the volume name of a disk.
-
- The user can print out the contents of the catalog on the
- parallel printer port. The printout can be sorted by
- name, date, size or type. These sort options are separate
- from the display sort options. There are options to include
- a table of contents (printed at the end of the printout),
- the date, size and folder/file comment. The user can select
- any combination.
-
- There are miscellanous menu options to: reset the window
- positions and sizes, set Auto Newtop, display catalog
- statistics, and display STDCAT limitations and set colors.
-
-
- Menu options
- ------------
-
- File menu
- ---------
-
- New
- Start a new catalog. The default name for the catalog
- will be STDCAT.CAT on the current drive. The number of
- disks will be set to 0. You can rename the catalog,
- when you save it to disk, using the Save As menu option.
-
- Open
- Open an existing catalog. The standard file selector
- dialog is displayed and the user can change the path
- or file at will. If OK is selected then an attempt
- will be made to open the catalog. If the catalog
- is corrupted then the user will be prompted to
- CONTINUE or CANCEL the open operation. If the user
- selects CONTINUE then the user will see what was
- found in the catalog. This could be complete garbage.
-
- Read
- Read a catalog onto the end of the existing open catalog.
- The disk numbers for the disks of the catalog being read
- start from the last disk number (plus 1) already loaded.
- You can't exceed 999 disks loaded at one time.
-
- Save
- Save the catalog to disk. The catalog will be saved
- using the current catalog name and will remain open.
-
- Save AS
- Save the catalog to disk using a new catalog name. The
- user will be prompted for a new catalog name using the
- standard file selector box.
-
- Close
- Close the catalog. If modifications have been made
- to the catalog then the user will be prompted to:
- save before exiting, close without saving or cancel
- the close operation. Once close is complete the
- user is back to the state where a catalog is not open.
-
- Quit
- Exit STDCAT and return to whatever shell invoked it.
- If modifications have been made to the catalog then the
- user will be prompted to: save before exiting, exit
- without saving or cancel the quit operation.
-
- View
- ----
- Display Fcomments
- This will cause the size/date/time fields to be switched
- with the folder/file comment field in the disk content
- window. Doing a full on the disk content window will
- show all of the folder/file information.
-
- Display Serial #
- The disk serial number will be displayed in place of the
- disk volume.
-
- Sort by Name
- Sort by Date
- Sort by Size
- Sort by Type
- All of these menu options sort the contents of the disk
- content window. When sorting by Date, Size or Type
- files that are similar for that attribute will be sorted
- by name and type as a sub-group.
-
- Descending
- Sort the enteries from highest to lowest. The default
- is from lowest to highest.
-
- Disk
- ----
-
- Find
- Find a file, folder, comment or volume name in the catalog.
- The '*' will match any sequence of characters and the
- '?' will match any character in a single position. The
- user can also specify lists and ranges for a particular
- character using '[set]'. Where 'set' is a list and/or
- range of characters. The wild cards '*' and '?' match
- literally if included in 'set'. If 'set' starts with '^'
- the set is complemented and to match ']' literally put
- it first in the list. You can mix '*', '?', and '[set]'
- as much as you want.
-
- EG.
- a* - match anything that starts with 'a'
- [am-ox]* - match anything that starts with 'a',
- 'm' to 'o', or 'x'.
- [^a-l]* - match anything that does not start
- with 'a' to 'l'.
-
- If you want to match '*' or '?' or '[' literally
- outside of a '[set]' then you can use the '/' as
- the escape character. To match '/' literally you have
- to use '//'.
-
- Add
- Add a disk to the end of the catalog. The new disk
- will be given the next disk number. The program will
- read in the disks volume name serial number and complete
- contents into ram. If you run out of ram then drop some
- accessories or use multiple catalogs.
-
- Update
- Update an existing disk in the catalog. The program
- checks the volume name and serial number on the disk to
- the volume name and serial number on the current disk.
- If the names are not the same the user is prompted to
- verify that it is OK to update the disk in the catalog.
- The program will copy over the comments of the folders
- and files that have the same path on the old disk as on
- the new disk.
-
- Delete
- Delete a disk from the catalog. The disks that come after
- the disk deleted will be shifted down (up?) and have their
- disk numbers decremented by 1.
-
- Volume
- Change the volume name of a disk. The user will be asked
- to place the disk in drive 'A' and then old volume name
- will be verified before changing the name. The volume
- dialog now allows lowercase letters to be entered. The
- volume name will be converted to all uppercase after the
- user exist the volume dialog. The program checks the
- disk serial number and will complain if it is not correct.
- If the disk serial number is not in the catalog then the
- program will load when the volume name has been changed.
-
- NOTE: The dialog will allow '?' and '*' to be entered
- into the volume name (a problem with limitations of
- tedinfo valid strings in GEM). The program will replace
- every occurance of '?' and '*' in the volume name with
- the underscore ('_') character.
-
- Comment
- -------
-
- Fcomment
- Add a comment to a folder/file in the catalog. This is
- also used to change an existing comment. There are only
- 33 characters available for a comment.
-
- Dcomment
- Add a comment to a disk in the catalog. This is also used
- to change an existing comment. There are only 33 characters
- available for a comment.
-
- Print
- -----
-
- Print Date
- When printing the catalog include the date and time as
- part of the printout.
-
- Print Size
- When printing the catalog include the size of a file as
- part of the printout.
-
- Print Fcomments
- When printing the catalog include the file comment for
- each file in the printout.
-
- Print Contents
- When printing the catalog include a table of contents.
- This lists each disk and the page number the disk can
- be found on. The table of contents is printed last.
-
- Disk Per Page
- This is a print switch that will cause only one disk to
- be printed on a page. This can waste lots of paper if
- there are not many files or folders on a disk.
-
- Sort by Name
- Sort by Date
- Sort by Size
- Sort by Type
- All of these menu options sort the contents of a disk
- when printed. When sorting by Date, Size or Type
- files that are similar for that attribute will be sorted
- by name and type as a sub-group.
-
- Descending
- Sort the enteries from highest to lowest the default is
- from lowest to highest.
-
- Print Catalog
- Print the catalog. A dialog is displayed and the user
- can select the range of disks to be printed (default
- is all disks). The user can stop the printout at
- any time. If the printer is not connected then printing
- will be aborted after a short timeout.
-
- The printer must support:
-
- 0x0D - Carrige Return
- 0x0A - Line feed
- 0x0C - Form feed
-
- 80 columns
- 66 lines (62 lines are used)
-
- Misc
- ----
-
- Default Windows
- Set the window sizes and positions back to default
- settings.
-
-
- Auto Newtop
- This is a mode switch that when checked will automatically
- switch the top window under the mouse. This saves from
- having to click on the window to bring it to the top
- when moving from one window to the other.
-
- Catalog Stats
- Displays the number of disks, the number of bytes used,
- the number of bytes unused, the number of files and the
- number of folders in the catalog.
-
- STDCAT Limits
- Displays some of the limitations of stdcat.
-
-
- General
- -------
-
- When you first run the program an attempt is made to find the
- environment variable 'STDCAT'. If the environment variable is not
- found then the program will try to open '\STDCAT.CAT'. If the
- environment variable is found then the default path set to the path
- after the '='. If the path does not end in a '\' then the program
- will setup the catalog file name to the last name in the path. If
- the path ends in a '\' then the program program will look for the
- default catalog file name 'STDCAT.CAT' using the path. If the
- catalog file cannot be opened then the user must either use the menu
- entries "New" or "Open" to either create a new catalog or open an
- existing catalog. If the file is there it is opened, read in, and
- displayed (Did you follow that?).
-
- Examples:
-
- STDCAT=c:\catalogs\ - open stdcat.cat in c:\catalogs
- STDCAT=c:\catalogs\usenet.cat - open specified catalog.
-
- This is now complicated by a single command line argument that
- will take precedence over what is set in the environment. This
- argument can be either the path to the catalog directory, a complete
- path to the catalog file, or a catalog file that exists in the
- catalog directory set by the environment variable STDCAT.
-
- Examples:
-
- Suppose the environment variable has been set to the following:
-
- STDCAT=c:\catalogs\usenet.cat
-
- Now execute stdcat from a shell
-
- 1) stdcat.ttp - open c:\catalogs\usenet.cat
- 2) stdcat.ttp arcdisks.cat - open c:\catalogs\arcdisks.cat
- 3) stdcat.ttp d:\test.cat - open d:\test.cat
- 4) stdcat.ttp \test.cat - open \test.cat on current drive
- 5) stdcat.ttp .\test.cat - open test.cat in the current directory
-
- If the environment variable STDCAT is not defined then 2 above is the
- same as 5.
-
- To select a current disk click on the name in the disk window
- (usally on the left of the screen). The contents of the current
- disk is always displayed in the disk content window (usually
- on the right of the screen). The menu entries "Update", "Volume",
- "Delete" and "Dcomment" only work with the current disk.
-
- To see the contents of a directory that is displayed in the disk
- content window double-click on the directory. This way you can
- decend the directory hierarchy of a disk. Use the closer on the
- disk content window to return to the previous level.
-
- A find operation will change the current disk to the disk and
- directory the file was last found in. It attemps to locate the
- file as the top item in the disk content window and highlites
- the folder/file.
-
-
- Acknowlegements
- ---------------
-
- I would like to thank John Altstadt (johna@moliman.molienergy.bc.ca)
- for testing version 4.0 and making some useful suggestions on
- program operation.
-
- I would also like to thank D. Hugh Redelmeier (hugh@csri.toronto.edu)
- for providing me with the source for the new pattern matching
- logic and for a useful list of improvements (some of which I
- implemented (my brain still hurts :-) ).
-
-
- Warnings
- --------
-
- This program has not been tested at all with two drive systems.
- It has, however, been tested in a ram disk, on a single drive
- system and on a hard disk. Use folderXXX if you plan to exceed
- the 40 folder limit on a disk.
-
-
- Bugs
- ----
-
- STDCAT V4.3 is not known to have any bugs. Should you discover
- any please let me know.
-
- Bob Silliker
- 13097 107th Ave
- Surrey B.C,
- Canada V3T 2G2
-
- Phone: (604)-584-3668
-
- bsilliker@wimsey.bc.ca
- ...!uunet!ubc-cs!van-bc!bsilliker
- ...!uunet!van-bc!bsilliker
-